import request from '@/utils/request'
// 登录请求

export const getEnterp = (params) => {
  return request({
    url: '/park/enterprise',
    params
  })
}
export const getEnterpById = (id) => {
  return request({
    url: `/park/enterprise/${id}`
  })
}

export const downdoc = (id) => {
  return request({
    url: `/download/${id}`,
    responseType: 'blob'
  })
}
export const fixEnterp = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}

export const addEnterp = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}
export const delEnterpData = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}
export const delEnterpTableData = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'DELETE'
  })
}
export const putEnterpTableData = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'PUT'
  })
}
export const getDetailById = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'GET'
  })
}
/**
 * 获取所有行业的list
 * @returns
 */
export const getEnterprIndustry = () => {
  return request({
    url: '/park/industry'
  })
}
/**
 *\/upload
 */
export const uploadUrl = (data) => {
  return request({
    url: '/upload',
    method: 'POST',
    responseType: 'blob',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}
